<?php

use Illuminate\Http\Request;
use Illuminate\Support\Facades\Route;
use App\Http\Controllers\api\Reservation\ApiReservationController;
use App\Http\Controllers\api\Reservation\RendeZvousController;
use App\Http\Controllers\api\Ali\AliPayController;

Route::middleware('auth:api')->get('/user', function (Request $request) {
    return $request->user();
});

//API预约
Route::prefix('make')->group(function (){
    //预约
    Route::post('reservation_index',[ApiReservationController::class,'reservationIndex']);
    //发送qq
    Route::any('send_qq',[ApiReservationController::class,'sendQq']);
    //
});

Route::prefix('zvous')->group(function (){

    //小程序展示预约数据
    Route::get('reserv_ation_show',[RendeZvousController::class,'reservAtionShow']);
    //小程序展示订单数据待支付
    Route::get('order_show',[RendeZvousController::class,'orderShow']);
    //小程序展示订单已完成状态
    Route::get('ali_refund',[RendeZvousController::class,'aliRefund']);

});

//支付宝支付
Route::get('index',[AliPayController::class,'index']);
Route::any('return',[AliPayController::class,'return']);
Route::any('cache',[AliPayController::class,'cache']);
Route::any('notify',[AliPayController::class,'notify']);
Route::any('redund/{out_trade_no}',[AliPayController::class,'redund']);
